home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Movie / Include / MovieFra.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.7 KB  |  96 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                MovieFra.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                Lonnie Millett
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef MOVIEFRA_H
  14. #define MOVIEFRA_H
  15.  
  16. #ifndef FWFRAME_H
  17. #include <FWFrame.h>
  18. #endif
  19.  
  20. #if defined(FW_BUILD_MAC) && !defined(__MOVIES__)
  21. #include <Movies.h>
  22. #endif
  23.  
  24. #if defined(FW_BUILD_MAC) && !defined(__ALIASES__)
  25. #include <Aliases.h>
  26. #endif
  27.  
  28. //==============================================================================
  29. // Classes defined in this interface
  30. //==============================================================================
  31.  
  32. class CMovieFrame;
  33.  
  34. //==============================================================================
  35. // Classes used by this interface
  36. //==============================================================================
  37.  
  38. class CMoviePart;
  39. class FW_CFacet;
  40. class XMPFrame;
  41. class XMPShape;
  42. class XMPMacMenuBar;
  43.  
  44. //==============================================================================
  45. // CMovieFrame
  46. //==============================================================================
  47.  
  48. class CMovieFrame : public FW_CFrame
  49. {
  50. public:
  51.     CMovieFrame();
  52.     void InitMovieFrame(XMPFrame* xmpFrame, CMoviePart* moviePart);
  53.     virtual ~ CDECL CMovieFrame();
  54.     
  55.     CMoviePart* GetMoviePart() const;
  56.     
  57.     FW_CFacet* NewFacet(XMPFacet* xmpFacet);
  58.     virtual void FacetAdded(FW_CFacet* facet);
  59.     virtual XMPWindow*  CreateChildWindow(XMPISOStr windowTitle);
  60.  
  61.     virtual void FrameShapeChanged();
  62.     
  63.     virtual void FocusStateChanged(XMPTypeToken focus, FW_Boolean newState);
  64.  
  65.     virtual FW_Boolean HandleKeyDown(XMPEventData event);
  66.     virtual FW_Boolean DoMenuEvent(XMPMenuBar *menuBar, XMPCommandID commandID);
  67.     virtual void  DoAdjustMenus(XMPMenuBar* menuBar);    
  68.     
  69.     void UpdateMovie();
  70.     void AdjustFrameSize(const FW_CRect& movieBox);
  71.     
  72.     void SetNewMovie(Movie newMovie);
  73.     
  74.     //----- Selection -------
  75.     void CloseSelection();
  76.     void ClearSelection(TimeValue currentTime, TimeValue duration);
  77.     void SelectAll();
  78.     void PasteMovieToSelection(Movie newMovie, TimeValue currentTime, TimeValue duration);
  79.     void PasteHandleToSelection(FW_PlatformHandle newHandle, OSType handleType, TimeValue currentTime, TimeValue duration);
  80.  
  81.     void ToggleLooping(FW_Boolean looping);
  82.  
  83. private:
  84.     CMoviePart* fMoviePart;
  85. };
  86.  
  87. //----------------------------------------------------------------------------------------
  88. // CMovieFrame::GetMoviePart
  89. //----------------------------------------------------------------------------------------
  90. inline CMoviePart* CMovieFrame::GetMoviePart() const
  91. {
  92.     return fMoviePart;
  93. }
  94.  
  95. #endif
  96.